<template>
  <div class="ezuikit">
    <div id="video-container"></div>
  </div>
</template>
<script>
// import EZUIKit from "ezuikit-js";
import { defineComponent, ref, reactive, toRefs, onMounted } from "vue";
const ezjs = require("@/assets/ezuikit.js");
export default defineComponent({
  setup() {
    const player = () => {
      const s = document.createElement("script");
      s.type = "text/javascript";
      //s.src = "@/assets/img/favorite2.png";
      s.src = ezjs;
      document.body.appendChild(s);
      var player = new EZUIKit.EZUIKitPlayer({
        id: "video-container", // 视频容器ID
        template: "pcLive",
        width: 400,
        height: 300,
        accessToken:
          "at.dhocve155epcaog924alkv2e5cwj55ex-9nz7jjt81l-1ktrmuo-iz3johuyp",
        url: "ezopen://open.ys7.com/J81771253/1.hd.live",
      });
      player.play();
    };

    onMounted(() => {
      player();
    });
    return {};
  },
});
</script>
<style lang="scss">
.ezuikit {
}
</style>
